#include "whalebutton.h"

#include <QMouseEvent>
#include <QCursor>
#include <QtDebug>
#include <QTimer>

WhaleButton::WhaleButton( QWidget * parent ) : QLabel( parent ) {
    this->setCursor( QCursor( Qt::PointingHandCursor ) );
}

void WhaleButton::mousePressEvent( QMouseEvent * event ) {
    if ( event->button() != Qt::LeftButton ) {
        return;
    }

    emit clicked();
}

void WhaleButton::setPlugin( WhalePlugin * plugin ) {
    this->mPlugin = plugin;
}

WhalePlugin * WhaleButton::plugin() {
    return this->mPlugin;
}
